%undefine _debugsource_packages
%define rel 23323
%define rpmfile plk-sane-%{version}-%{rel}.x86_64.rpm

Summary(ru_RU.UTF-8):	Драйвера Plustek
Summary:	Plustek drivers
Name:		plk-sane
Version:	2.1.84
Release:	%{rel}.3
License:	GPL
Group:		System/Configuration/Printing
Url:		https://plustek.com
Vendor:		Plustek
Source0:	%{rpmfile}
BuildRequires:	%{_bindir}/rpm2cpio
BuildRequires:	cpio
ExclusiveArch:	x86_64
Requires:	sane

%description
SANE drivers for Plustek series scanner.

%description -l ru_RU.UTF-8
Драйвера SANE для сканеров Plustek.

%files
/opt/apps
%{_sysconfdir}/sane.d/dll.d/*
%{_sysconfdir}/sane.d/*.conf
%{_sysconfdir}/sane.d/ini
%{_prefix}/include/sane/*
%{_prefix}%{_unitdir}/pscannermgr.service
%{_prefix}/lib/udev/rules.d/*.rules
%{_libdir}/sane/*

#------------------------------------------------------------------

%prep
%setup -T -c
cp %sources .
rpm2cpio %{rpmfile} | cpio -idmv

%build

%install
mv -f etc %{buildroot}
mv -f opt %{buildroot}
cp -rf usr/local/etc %{buildroot}
rm -rf usr/share usr/local
mv -f usr %{buildroot}
